﻿<!DOCTYPE html>
<html>
<head>
    <link href="../themes/default/easyui.css" rel="stylesheet" />
    <link href="../themes/icon.css" rel="stylesheet" />

    <script src="../jquery-easyui-1.4.3/jquery.min.js"></script>
    <script src="../jquery-easyui-1.4.3/jquery.easyui.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>

	<meta charset="utf-8" />
    <script>
        $(function () {
            $('#tel').validatebox({
                required: true,
                validType: 'tel',
            });
            //限制最小长度为5
            $.extend($.fn.validatebox.defaults.rules, {
                minLength: {
                    validator: function (value, param) {
                        return value.length >= param[0];
                    },
                    message: 'Please enter at least {0} characters.'
                }
            });
        })
    </script>
</head>
<body>
    <table>
        <tr>
            <td>礼品代号：</td>
            <td><input class="easyui-validatebox" data-options="validType:'minLength[3]'">  </td>
        </tr>
        <tr>
            <td>礼品名称：</td>
            <td><input class="easyui-validatebox" data-options="validType:'minLength[3]'">  </td>
        </tr>
        <tr>
            <td>礼品图片：</td>
            <td><input class="easyui-validatebox" data-options="validType:'minLength[2]'">  </td>
        </tr>
        <tr>
            <td>所需积分：</td>
            <td><input id="tel" class="easyui-validatebox" data-options="required:true,validType:'tel'" /></td>
        </tr>
        <tr>
            <td>礼品数量：</td>
            <td><input id="vv" class="easyui-validatebox" data-options="required:true,validType:'tel'" /></td>
        </tr>
        <tr>
            <td></td>
            <td><input type="button" id="btnInsert" value="新增" /></td>
        </tr>
    </table>
   
</body>
</html>
